package com.gulimall.seckill.test;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@EnableScheduling
//@Component
@EnableAsync
public class testScheduler {

    @Async
    @Scheduled(cron = "* * * * * ? ")
    public void test() throws InterruptedException {
        log.info("hello,schedule");
        Thread.sleep(3000);
    }
}
